package com.fzg.common.demo.hutool;

import cn.hutool.core.io.FileUtil;
import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.http.HttpUtil;
import lombok.extern.slf4j.Slf4j;

import java.io.File;

/**
 * create by fzg
 * 2022/12/13 16:24
 */

@Slf4j
public class Demo11 {
    public static void main(String[] args) {
        File file = QrCodeUtil.generate("https://bailey.pinruikm.com/", 300, 300, FileUtil.file("C:\\Users\\Asus\\Desktop\\temp\\qrcode.jpg"));
        String decode = QrCodeUtil.decode(FileUtil.file("C:\\Users\\Asus\\Desktop\\temp\\qrcode.jpg"));
        log.info(decode);
        String s = HttpUtil.get(decode);
        log.info(s);
    }
}
